const {defineConfig} = require('@vue/cli-service')
const path = require("path");
const webpack = require('webpack');
const name = process.env.VUE_APP_TITLE || 'Xros Back End';// 网页标题

function resolve(dir) {
    return path.join(__dirname, dir)
}


//TO CARE （时间：2024/3/16 17:33,注意：下面是默认的配置）
// module.exports = defineConfig({
//     transpileDependencies: true
// })


module.exports = {
    transpileDependencies: true

    , css: {
        loaderOptions: {
            sass: {
                sassOptions: {outputStyle: "expanded"}
            }
        }
    }
    , configureWebpack: {
        name: name,
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
        // ,externals: {"jquery": "jQuery"}
        ,plugins: [
            // new webpack.optimize.CommonsChunkPlugin('common.js'),
            new webpack.ProvidePlugin({
                $: "jquery",
                jQuery: "jquery",
                jquery: "jquery",
                "window.jQuery": "jquery"
            })
        ],
    }



}
